<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page language="java" import="java.text.*,java.util.*" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>


<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title>Aceros Arequipa - Sistema Cuentas Corrientes</title>

<link type="text/css" href="css/styles.css" rel="stylesheet" />
<link href="css/estilos.css" rel="stylesheet" type="text/css">
<script language="javascript" src="js/lib/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="js/jquery-calendar.pack.js"></script> 
<script src="js/jquery-calendar-es.js"></script> 
<link href="css/jquery-calendar.css"  type="text/css" rel="stylesheet" />

<script type="text/javascript" src="js/lib/jquery-validate/jquery.validate.js"></script>
<script type="text/javascript" src="js/lib/jquery-validate/localization/messages_es.js"></script>




<script type="text/javascript" language="javascript">

 var vent=null;


function validarFecha(obj) {
		var dt = obj.value;
		var temp ="";
		if(dt.indexOf("/")==-1){	
			for(var i=0;i<dt.length;i++){
				if(i==2 || i==4)	temp = temp +"/"+dt.charAt(i);
				else				temp = temp + dt.charAt(i);
			}
			obj.value = temp;
		}
}

function verificaFormulario(){
			$("#formulario").valid();
}

function setCheckedValue(radioObj, newValue) {
	var val = newValue.toString();
	if(val==null || val=="null" || val =="")	val = "SA";
	for(var i = 0; i < radioObj.length; i++) {
		radioObj[i].checked = false;
		if(radioObj[i].value == val) 	radioObj[i].checked = true;
	}
}

function obtenerNombreCliente(){
	
	//setCheckedValue(document.getElementsByName('radioAplicacionCtaCte'),"<%=request.getAttribute("aplicacion")%>");
	var codigoClienteParam = document.forms[0].codigoCliente.value;
	
	$("#nombreCliente").load("<%=request.getContextPath() %>/ConsultaAction.do?metodo=obtenNombreCliente&codigoCliente=" + codigoClienteParam, function(response) {
		  if (response == "") {
			  $(".cliente").hide();
		  } else{
			  $(".cliente").show();  
		  }  
	});
}

function cargarDatosClienteEnter(evt) {
	var keyCode = null;
	var codigoClienteParam = document.forms[0].codigoCliente.value;
	if(evt.which){
		keyCode = evt.which;
	}else if(evt.keyCode){
		keyCode = evt.keyCode;
	}
	if(13==keyCode){
		$("#nombreCliente").load("<%=request.getContextPath() %>/ConsultaAction.do?metodo=obtenNombreCliente&codigoCliente=" + codigoClienteParam, function(response) {
			  if (response == "") {
				  $(".cliente").hide();
			  } else{
				  $(".cliente").show();  
			  }  
		});
	}
}

function buscarClientes(){

	var f=document.forms[0];

	var razon = f.razonSocial.value;
	var ruc = f.ruc.value;
	
	if((razon) || (ruc)){	
		 
		mostrarCargando();
		$('#linkBusqueda').attr('href','#');  	
		//document.forms[0].metodo.value="ConsultaClienteProcess";
		document.forms[0].action="<%=request.getContextPath()%>/ConsultaAction.do?metodo=ConsultaClienteProcess&numPop="+3;
	    document.forms[0].submit();
	
	}
	else{
		alert('Debe completar un filtro de busqueda');
	
	}



}

function exportar(){	
	if($("#formulario").valid()){		 
		document.forms[0].metodo.value="consultaCuentasCorrientesProcess";
		document.forms[0].action="<%=request.getContextPath()%>/ConsultaAction.do?flgExportar=1";
	    document.forms[0].submit();
    }
}

function mostrarCargando() {
  $("#cargando").show();
}

function vuelveInicio(){
	document.forms[0].metodo.value="IniciarBuscarCliente";
	document.forms[0].submit();
}

function limpiar() {
	var f=document.forms[0];
	
	f.razonSocial.value="";
	f.ruc.value="";
}

function seteoMot(cod,nombre){
	
	var f=document.forms[0];
	
	var dest = window.opener.document.forms[0];
	
	//dest.codigoCliente.value=cod;
	//dest.nombreCliente.value=nombre;
	
	dest.action="<%=request.getContextPath() %>/ConsultaAction.do?metodo=refrescar3&codigoCliente=" + cod+"&razSoc=" +nombre;
	dest.submit();
	
	window.close();
	
	

}

		
</script>	



</head>

<body>	


<table width="95%" border="0" cellspacing="0" cellpadding="0" align="left">
      <tr>
        <td height="0" colspan="2" valign="top"></td>
        </tr>
      <tr>
        <td width="7%" valign="top" align="center">
        
        
        
        </td>
        <td bgcolor="#FFFFFF" width="83%" valign="top" align="left">
        
<html:form action="/ConsultaAction.do" method="post" styleId="formulario">
			
			<html:hidden property="metodo"/>
				
					
					<div class="tituloForm">AVISO DE VENCIMIENTO<br></div>
				
				<table width="100%">
				
					<tr>
						<td>&nbsp;</td>
					</tr>
					
					<tr>
						<td>&nbsp;</td>
					</tr>
					
					
				
					<logic:notEmpty name="numeroGarantias">
						<tr>
							<td>
								<label for="nombreCliente" class="arial_negro12">Garantias:</label>
							</td>
							<td>						
									<label  class="arial_negro12"><bean:write name="numeroGarantias" />Cartas Fianzas	</label>																							
								
							</td>
							
							
						</tr>
						
						</logic:notEmpty>
						<logic:notEmpty name="numeroFacturas">
					  	<tr>
							<td>
								<label for="ruc" class="arial_negro12">Facturas o Boletas:</label>
							</td>
							<td>	
								<label  class="arial_negro12"><bean:write name="numeroFacturas"/>Documentos Proximos a Vencer</label>	
							</td>
							
							
						</tr>
						</logic:notEmpty>
						
						<logic:notEmpty name="numeroLetras">
					  	<tr>
							<td>
								<label for="ruc" class="arial_negro12">Letras:</label>
							</td>
							<td>	
								<label  class="arial_negro12"><bean:write name="numeroLetras"/>Documentos Proximos a Vencer</label>	
							</td>
							
							
						</tr>
						</logic:notEmpty>
						
						
						<logic:notEmpty name="numeroGarantiasVencidas">
						<tr>
							<td>
								<label for="nombreCliente" class="arial_negro12">Garantias:</label>
							</td>
							<td>						
									<label  class="arial_negro12"><bean:write name="numeroGarantiasVencidas" />Cartas Fianzas Vencidas	</label>																							
								
							</td>
							
							
						</tr>
						
						</logic:notEmpty>
						<logic:notEmpty name="numeroFacturasVencidas">
					  	<tr>
							<td>
								<label for="ruc" class="arial_negro12">Facturas o Boletas:</label>
							</td>
							<td>	
								<label  class="arial_negro12"><bean:write name="numeroFacturasVencidas"/>Documentos Vencidos</label>	
							</td>
							
							
						</tr>
						</logic:notEmpty>
						
						<logic:notEmpty name="numeroLetrasVencidas">
					  	<tr>
							<td>
								<label for="ruc" class="arial_negro12">Letras:</label>
							</td>
							<td>	
								<label  class="arial_negro12"><bean:write name="numeroLetrasVencidas"/>Documentos Vencidos</label>	
							</td>
							
							
						</tr>
						</logic:notEmpty>
						
						<tr>
	            <td align="center">&nbsp;</td>
		        </tr>
		        <tr>
		        	
		           					
	          	</tr>
					</table>
			
				
				
			</html:form>    
			
		
		</td>
      </tr>
      <tr>
		<td colspan="2">
			<jsp:include page="include/pie.jsp"></jsp:include> 
		</td>
	 </tr>
    </table>
    

</body>

<input type="hidden" name="strPv_oculto" value="">

</html>



